<?php
declare (strict_types=1);

namespace addons\V2\admin\validate;

use think\Validate;

class OrderDeliver extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'    =>    ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'id'              => 'require',
        'receiver'        => 'require',
        'receiver_tel'    => 'require',
        'province'        => 'require',
        'city'            => 'require',
        'district'        => 'require',
        'address_details' => 'require',
        'express_id'      => 'require',
        'express_code'    => 'require',

    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名'    =>    '错误信息'
     *
     * @var array
     */
    protected $message = [
        'id.require'              => '未查询到相关订单',
        'receiver.require'        => '请填写收货人',
        'receiver_tel.require'    => '请填写收货电话',
        'province.require'        => '请选择省',
        'city.require'            => '请选择市',
        'district.require'        => '请选择区/县',
        'address_details.require' => '请填写详细收货地址',
        'express_id.require'      => '请选择发货快递',
        'express_code.require'    => '请填写快递单号',

    ];
}
